##import os
##os.system("start https://www.lanqiao.cn/problems/2296/learning/");

i = 2023
while 1:
    s = bin(i)
    if s[-1 : -7 : -1] == 6 * '0':
        print(i)
        break
    i = i + 1
